package day005.Demo;

public class Person {
    String name;
    int    age;
    boolean gender;//true男
    boolean partner;//true没结婚

    public Person(String name, int age, boolean gender, boolean partner) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.partner = partner;
    }


    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("Person{");
        sb.append("name='").append(name).append('\'');
        sb.append(", age=").append(age);
        sb.append(", gender=").append(gender);
        sb.append(", partner=").append(partner);
        sb.append('}');
        return sb.toString();
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public boolean isGender() {
        return gender;
    }

    public boolean isPartner() {
        return partner;
    }
}

